package com.ruoyi.lxy.zust.Controller;

import cn.dev33.satoken.annotation.SaCheckPermission;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.lxy.zust.domain.vo.TDepartmentVo;
import com.ruoyi.lxy.zust.service.IDepartmentServiceI;
import lombok.RequiredArgsConstructor;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Validated
@RequiredArgsConstructor
@RestController
@RequestMapping("/lxy/zust/department")
public class TDepartmentController {
    private final IDepartmentServiceI dependantService;

    /**
     * 获取所有部门
     */
    @SaCheckPermission("lxy:zust:department:list")
    @GetMapping("/list")
    public TableDataInfo<TDepartmentVo> list() {
        return dependantService.getDepartmentList();
    }
}
